package com.itany.book.service;

import com.github.pagehelper.PageInfo;
import com.itany.exception.FileUploadErrorException;
import com.itany.exception.FlagDisEnableException;
import com.itany.exception.FlageEnableException;
import com.itany.exception.RequestParamException;
import com.itany.pojo.Book;
import com.itany.pojo.Examine;
import com.itany.pojo.Press;
import com.itany.pojo.Supplier;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


/**
 * Auther:ws@itany.com
 * Date:20-10-12 上午11:51
 * Version:1.0
 * Description:
 */

public interface BookService {

    /**
     * 查询书籍
     * @param page
     * @param rows
     * @return
     */
    public PageInfo<Book> findByParam(Integer page, Integer rows, String bookName, String ISBN, Integer pressId, Integer supplierId);

    /**
     * 查询供应商
     * @return
     */
    public List<Supplier> findSupplier();


    public List<Press> findPress();


    public void DisEnableFlag(String isbn) throws RequestParamException, FlagDisEnableException;

    public void EnableFlag(String isbn) throws RequestParamException, FlageEnableException;

    public PageInfo<Examine> examineSupplier(Integer page, Integer rows, String bookname, String isbn, Integer supplierid);

    /**
     * 添加书籍
     * @param bookname
     * @param ISBN
     * @param price
     * @param number
     * @param groupprice
     * @param layout
     * @param register
     * @param weight
     * @param bookintroduce
     * @param authorintroduce
     * @param author
     * @param publishdate
     * @param fromat
     * @param pagenumber
     * @param press
     * @param file
     * @param supplierId
     */
    public void addBook(String bookname, String ISBN, String price, String number, String groupprice,
                        String layout, String register, String weight, String bookintroduce, String authorintroduce,
                        String author, String publishdate, String fromat, String pagenumber, String press,
                        MultipartFile file, Integer supplierId) throws RequestParamException, FileUploadErrorException;
}
